# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgbase=python-pydnet
pkgname=('python2-pydnet' 'python-pydnet')
_pkgname=PyDNET
pkgver=1.0
pkgrel=10
pkgdesc='Distribution Network Evaluation Tool.'
arch=('any')
url='https://pypi.python.org/pypi/PyDNET/'
license=('MIT')
makedepends=('python2-setuptools' 'python-setuptools')
source=("https://pypi.python.org/packages/34/87/083403e9ce4a737888fd9740bd151b59a6d017887cfd9ab908ec67a96a62/$_pkgname-$pkgver.tar.gz")
sha512sums=('ade69de549b37a4e156a99c7d4370d4e9b3ba7015c045265a0d87ff273de116ff26c674c83cf613930c33e57ff64b13c2b01d2a8ee38f3a6aa6adc2a47329421')

prepare() {
  cp -a "$_pkgname-$pkgver"{,-2}
}

build() {
  cd "$_pkgname-$pkgver-2"

  python2 setup.py build

  cd "$srcdir/$_pkgname-$pkgver"

  python setup.py build
}

package_python2-pydnet() {
  depends=('python2' 'python2-networkx' 'python2-pyaml' 'python2-graphillion')

  cd "$_pkgname-$pkgver-2"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

package_python-pydnet() {
  depends=('python' 'python-networkx' 'python-pyaml' 'python-graphillion')

  cd "$_pkgname-$pkgver"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

